home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / gd_v11.zip / EXAMPLE1.DEF next >
Text File  |  1992-12-16  |  2KB  |  81 lines

  1. # 'module' defines the module and its name
  2.  
  3. module "FOO EDITOR V. 1.1" {
  4.    # The following descriptions are attached to the module.
  5.    # They will be displayed when the module is started or when
  6.    # users request.
  7.  
  8.    desc "Data editor for game FOO, by Joe Henry."
  9.    desc " "
  10.    desc "This editor allows you to change the name of the hero,"
  11.    desc "the current dungeon level and lives left."
  12.  
  13.    # This is an 'absolute' record which means it has only a
  14.    # set of data to be used with this record definition.
  15.  
  16.    absolute "Simple Record" {
  17.      # The following descriptions will be attached to the recrod.
  18.  
  19.      desc "Record for name, level and lives"
  20.  
  21.      field "Level" {
  22.         # The following descriptions will be attached to the field.
  23.  
  24.         desc "The current level of the dungeon.  The total number"
  25.         desc "of levels is 60.  But there are important stuffs"
  26.         desc "in level 44 needed for the game's progress.  Thus the"
  27.         desc "input must be between 1 and 43."
  28.  
  29.         # Here it defines the location and size of data in the
  30.         # game file.  It says the data is located at offset 0 of
  31.         # the record with the size of 1 byte long and interpreted
  32.         # as a byte.  Since the offset of the data set in an
  33.         # absolute record against beginning of the file is 0, the
  34.         # data offset here is actually the offset from the beginning
  35.         # of the file.
  36.  
  37.         data 0 1 byte
  38.  
  39.         # Now it defines the display of the field in the entry
  40.         # form.  It is in page 0, The label of the field "Level"
  41.         # is at row 3, column 5.  The entry is at row 3, column 12
  42.         # as a 3 digits decimal number.
  43.  
  44.         entry 0 3 5 3 12 3 dec
  45.      }
  46.  
  47.      field "Lives" {
  48.         # Descriptions for the field.
  49.  
  50.         desc "Lives remained."
  51.         desc "Must be between 1 and 20."
  52.  
  53.         # Data located at offset 1 of the file, 1 bytes long and
  54.         # interpreted as a byte.
  55.  
  56.         data 1 1 byte
  57.  
  58.         # label at page 0, row 4, column 5
  59.         # entry at row 4, column 12, 3 digit decimal
  60.  
  61.         entry 0 4 5 4 12 3 dec
  62.      }
  63.      field "Name" {
  64.         # Descriptions for the field.
  65.  
  66.         desc "The player's name in the game."
  67.         desc "Must be less than 10 chars."
  68.  
  69.         # Data located at offset 4 of the file, 10 bytes long,
  70.         # as an ASCII string
  71.  
  72.         data 4 10 ascii
  73.  
  74.         # Label at page 0, row 5, column 5
  75.         # entry at row 5, column 12, 10 ASCII characters
  76.  
  77.         entry 0 5 5 5 12 10 asc
  78.      }
  79.    }
  80. }
  81.